import IndexPage from "./pages/indexPage";
import Setting from "./pages/setting";
import './App.css';
import 'antd/dist/antd.css';
import {
    BrowserRouter as Router,
    Switch,
    Route,
    Routes,
    Link
} from "react-router-dom";
import {useEffect} from "react";
import {createData} from "./utils/handleLocal";
import {initAllData, isFirst, toInit, urlList} from "./utils/initData";


const App = () => {
    useEffect(() => {
        // initAllData()
        // isFirst()
        // if(toInit()){
        //     // initAllData()
        //     console.log('不是第一次')
        // } else {
        //     initAllData()
        //     console.log('是第一次')
        // }
    },[])
        return(
            <Router >
                <div style={{height:'100%',padding:'2%'}}>
                    <Routes>
                        <Route path="/" element={<IndexPage />} />
                        <Route path="/set" element={<Setting />} />
                    </Routes>
                </div>
            </Router>
        )
}

export default App;
